<?php
namespace Mobile\Controller;
use Think\Controller;
use Common\Model\File;
class IndexController extends Controller {
    public function index(){
       $list = M('movie');
        //分页
        /*$total=$list->count();
        $page = new \Think\Page($total,3);
        $page_str = $page->show();*/
        $movies = $list->order('id desc')->select();
        foreach($movies as $key=>$val ){
            //$list[$key]['cover'];
            $f=File::sub($val['cover']).$val['cover'];
            $movies[$key]['cover']='/Public/Uploads/'.$f;
        }
        //var_dump($list);
        $this->assign('list',$movies);
        $this->display();
    }
}